<?php /* Smarty version 2.6.20, created on 2017-05-07 09:45:04
         compiled from admin_order_pay.htm */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'date_format', 'admin_order_pay.htm', 20, false),array('modifier', 'get_spot_model_name', 'admin_order_pay.htm', 56, false),array('modifier', 'number_format', 'admin_order_pay.htm', 65, false),)), $this); ?>
<div class="path">
    <div>
    	<a href="main.php?cg_u_type=1">用户中心</a> <span>&gt;</span> 
    	<a href="main.php?m=product&s=admin_buyorder">订单管理</a> <span>&gt;</span> 
        订单付款
    </div>
</div>
<div class="main">
	<div class="wrap">
        <div class="order_pay">
            <h2>订单信息</h2>
            <table class="table">
                <tbody>
                <tr class="tr">
                    <td width="50">订单编号</td>
                    <td width="150"><a href="main.php?m=product&s=admin_orderdetail&id=<?php echo $this->_tpl_vars['de']['order_id']; ?>
"><?php echo $this->_tpl_vars['de']['order_id']; ?>
</a></td>
                    <td width="50">订单状态</td>
                    <td width="100"><b class="org"><?php echo $this->_tpl_vars['de']['statu_text']; ?>
</b></td>
                    <td width="50">下单时间</td>
                    <td><?php echo ((is_array($_tmp=$this->_tpl_vars['de']['create_time'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%Y-%m-%d&nbsp;%H:%M:%S") : smarty_modifier_date_format($_tmp, "%Y-%m-%d&nbsp;%H:%M:%S")); ?>
</td>
                </tr>
                <tr class="tr">
					<td>配送方式</td>
                    <td colspan="99"><?php echo $this->_tpl_vars['de']['shipping_name']; ?>
</td>
                </tr>



                </tbody>
            </table>
            <table class="table alc">    
            <thead>
                <tr>
                    <th class="partition" colspan="99">订单信息</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td colspan="2">产品</td>
                    <td>座位</td>
                    <td width="90">单价</td>
                    <td width="60">数量</td>
                    <td width="90">总价</td>
                </tr>
                <?php $_from = $this->_tpl_vars['de']['product']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['list']):
?>
                <tr>
                    <td class="al"><a target="_blank" href="index.php?m=product&s=detail&id=<?php echo $this->_tpl_vars['list']['product_id']; ?>
"><img src="<?php echo $this->_tpl_vars['list']['pic']; ?>
_60X60.jpg" /></a></td>
                    <td class="al <?php if ($this->_tpl_vars['list']['service']): ?>npb<?php endif; ?>">
                        <a target="_blank" href="index.php?m=product&s=detail&id=<?php echo $this->_tpl_vars['list']['product_id']; ?>
">
                            <?php echo $this->_tpl_vars['list']['name']; ?>

                        </a>
                    </td>
                    <td>
                        <?php if (! empty ( $this->_tpl_vars['list']['spot_model_id'] )): ?>
                        <?php $_from = $this->_tpl_vars['list']['spot_model_id']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['k'] => $this->_tpl_vars['vo']):
?>
                       <?php echo ((is_array($_tmp=$this->_tpl_vars['vo'])) ? $this->_run_mod_handler('get_spot_model_name', true, $_tmp) : get_spot_model_name($_tmp)); ?>
<?php echo $this->_tpl_vars['list']['seat_seat_row'][$this->_tpl_vars['k']]; ?>
排<?php echo $this->_tpl_vars['list']['seat_seat_cols'][$this->_tpl_vars['k']]; ?>
座<br/>
                        <?php endforeach; endif; unset($_from); ?>

                        <?php else: ?>

                            择优分配

                        <?php endif; ?>
                    </td>
                    <td <?php if ($this->_tpl_vars['list']['service'] || $this->_tpl_vars['list']['product_give']): ?>class="npb"<?php endif; ?>><?php echo $this->_tpl_vars['config']['money']; ?>
<?php echo ((is_array($_tmp=$this->_tpl_vars['list']['price'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2) : number_format($_tmp, 2)); ?>
</td>
                    <td <?php if ($this->_tpl_vars['list']['service'] || $this->_tpl_vars['list']['product_give']): ?>rowspan="2"<?php endif; ?>>x <?php echo $this->_tpl_vars['list']['num']; ?>
</td>
                    <td <?php if ($this->_tpl_vars['list']['service'] || $this->_tpl_vars['list']['product_give']): ?>rowspan="2"<?php endif; ?>><?php echo $this->_tpl_vars['config']['money']; ?>
<?php echo ((is_array($_tmp=$this->_tpl_vars['list']['sum'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2) : number_format($_tmp, 2)); ?>
</td>
                </tr>
                <?php if ($this->_tpl_vars['list']['product_give']): ?>
                <tr class="product_give">
                    <td class="al">赠品</td>
                    <td class="al">
                        <?php $_from = $this->_tpl_vars['list']['product_give']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['slist']):
?>
                            <p><?php echo $this->_tpl_vars['slist']['pname']; ?>
</p>
                        <?php endforeach; endif; unset($_from); ?>
                    </td>
                </tr>
                <?php endif; ?>
                <?php if ($this->_tpl_vars['list']['service']): ?>
                <tr class="other">
                    <td class="al">服务</td>
                    <td class="al">
                        <?php $_from = $this->_tpl_vars['list']['service']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['slist']):
?>
                            <p><?php echo $this->_tpl_vars['slist']['name']; ?>
</p>
                        <?php endforeach; endif; unset($_from); ?>
                    </td>
                    <td>
                        <?php $_from = $this->_tpl_vars['list']['service']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['slist']):
?>
                            <p><?php echo $this->_tpl_vars['config']['money']; ?>
<?php echo $this->_tpl_vars['slist']['price']; ?>
</p>
                        <?php endforeach; endif; unset($_from); ?>
                    </td>
                </tr>
                <?php endif; ?>
                <?php endforeach; endif; unset($_from); ?>
                <tr>
                    <td colspan="99">
                    <dl><dt>订单金额:</dt><dd class="price"><?php echo $this->_tpl_vars['config']['money']; ?>
<?php echo ((is_array($_tmp=$this->_tpl_vars['de']['cost']+$this->_tpl_vars['de']['freight'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2) : number_format($_tmp, 2)); ?>
</dd></dl>
                    <dl><dt>运费:</dt><dd><?php echo $this->_tpl_vars['config']['money']; ?>
<?php echo ((is_array($_tmp=$this->_tpl_vars['de']['freight'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2) : number_format($_tmp, 2)); ?>
</dd></dl>
                    <dl><dt>商品金额:</dt><dd><?php echo $this->_tpl_vars['config']['money']; ?>
<?php echo ((is_array($_tmp=$this->_tpl_vars['de']['cost'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2) : number_format($_tmp, 2)); ?>
</dd></dl>
                    </td>
                </tr>
            </tbody>
        	</table>
        </div>
        <div class="order_pay mt20">
            <h2>订单支付</h2>
            <table class="table">
                <tbody>
                <tr class="tr">
                    <td>
                    您选择了 <b class="org"><?php echo $this->_tpl_vars['pay']['payment_name']; ?>
</b>&nbsp;
                    <?php if ($this->_tpl_vars['pay']['payment_type'] != 'cod'): ?><a href="javascript:#" class="change">更改支付方式</a><?php endif; ?>
                    </td>
				</tr>
                <tr class="tr">
                 	<td class="td"><?php echo $this->_tpl_vars['pay']['payment_desc']; ?>
</td>
                    <td class="paymemt hidden">
                    <?php $_from = $this->_tpl_vars['paymemt']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['list']):
?>
                        <?php if ($this->_tpl_vars['list']['payment_type'] == 'alipay' || $this->_tpl_vars['list']['payment_type'] == 'cbp'): ?>
                        <li <?php if ($this->_tpl_vars['list']['payment_id'] == $this->_tpl_vars['de']['payment_id']): ?> class="checked" <?php endif; ?>  >
                            <img align="top" title="<?php echo $this->_tpl_vars['list']['payment_name']; ?>
" alt="<?php echo $this->_tpl_vars['list']['payment_name']; ?>
" data-param="{'id':'<?php echo $this->_tpl_vars['list']['payment_id']; ?>
'}" src="image/payment/<?php echo $this->_tpl_vars['list']['payment_type']; ?>
.gif" /><i></i>
						</li>
                        <?php endif; ?>
                    <?php endforeach; endif; unset($_from); ?>
                    </td>
                </tr>
                <?php if ($this->_tpl_vars['pay']['payment_type'] != 'cod'): ?>
                <tr>
                	<td>
                    	<a class="btn-pay" href="javascript:0">确定支付</a>
                        <input type="hidden" id="payment_id" value="<?php echo $this->_tpl_vars['pay']['payment_id']; ?>
"/>
                    </td>
                </tr>
                <?php endif; ?>
				</tbody>
        	</table>
            <script type="text/javascript">
            $(".change").bind("click",function(){
				$(this).addClass("hidden");		
				$(this).prev().addClass("hidden");		
				$('.td').addClass("hidden").siblings().removeClass("hidden");
			});
			$(".btn-pay").bind("click",function(){
				var href="?m=payment&s=admin_pay&order_id=<?php echo $this->_tpl_vars['de']['order_id']; ?>
";
				var payment_id=$("#payment_id").val();
				if(!payment_id)
				{
					alert("请选择支付方式！");
					return false;
				}

				window.location=href+"&payment="+payment_id;
				return false;
			});
			$(".order_pay li").bind("click",function(){
				var data = $(this).children('img').attr('data-param');
				eval("data = "+data);
				$("#payment_id").val(data.id);
				$(this).addClass("checked").siblings().removeClass("checked");
			});
            </script>
        </div>
    </div>
</div>